<script setup>
import { useHomeStore } from '../store'
import { storeToRefs } from 'pinia'
import {NButton, NInput} from "naive-ui";
const store = useHomeStore()
const { word,model,sword ,matchData,wordData,sentence,concept,output,sWordData,conceptData} = storeToRefs(store)
const { defSWord ,defWord,flash,getMeaning,defModel,defConcept} = store
</script>

<template>
  <div class="wordAction">
    <n-input class="no-drag" round  style="width: 100px" v-model:value="word.name" placeholder="词" /> =>
    <n-input class="no-drag" round  style="width: 100px" v-model:value="word.abs" placeholder="抽象" />
    <n-button class="no-drag button" round type="primary"  @click="defWord()">添加</n-button>
    <br />
    <n-input class="no-drag" round  style="width: 100px" v-model:value="sword" placeholder="固定词组" />
    <n-button class="no-drag button" round type="primary"  @click="defSWord()">添加</n-button>
  </div>
  <div class="modelAction">
    <n-input class="no-drag" round style="width: 80px" v-model:value="model.left" placeholder="左" /> +
    <n-input class="no-drag" round style="width: 80px" v-model:value="model.right" placeholder="右" /> =>
    <n-input class="no-drag" round style="width: 50px" v-model:value="model.num1" placeholder="num1" />
    <n-input class="no-drag" round style="width: 50px" v-model:value="model.num2" placeholder="num2" />
    <n-button class="no-drag" round type="primary" @click="defModel()">添加</n-button>
    <br />
    <n-input class="no-drag" round style="width: 80px" v-model:value="concept.name" placeholder="左" /> +
    <n-input class="no-drag" round style="width: 80px" v-model:value="concept.concept" placeholder="右" /> =>
    <n-input class="no-drag" round style="width: 50px" v-model:value="concept.num" placeholder="num1" />
    <n-button class="no-drag" round type="primary" @click="defConcept()">添加</n-button>
  </div>
</template>

<style scoped>

</style>